Set the console limit for DomUs based on a value set in xend-config.sxp.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 19 Oct 2005 12:37:16 +0000 (13:37 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 19 Oct 2005 12:37:16 +0000 (13:37 +0100)
Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/examples/xend-config.sxp
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/XendRoot.py

index 1b6b8c52e1ec7a06047a852ed5e87c9b5c92f435..75152f21db519e9a1524515f5acadafeeb4f0452 100644 (file)
@@ -20,6 +20,9 @@
 # Specifying the empty string '' allows all connections.
 (console-address   'localhost')
 
+# The limit (in kilobytes) on the size of the console buffer
+(console-limit 1024)
+
 ## Use the following if VIF traffic is routed.
 # The script used to start/stop networking for xend.
 #(network-script     network-route)
index 1e3d482a754feaeb2f14318d627e00d5db460470..bb3088d50036839be12d41e275ec4c5033d9d0ab 100644 (file)
@@ -594,7 +594,7 @@ class XendDomainInfo:
         to_store = {
             'domid':              str(self.domid),
             'vm':                 self.vmpath,
-
+            'console/limit':      str(xroot.get_console_limit() * 1024),
             'memory/target':      str(self.info['memory_KiB'])
             }
 
index 85a13286ddca0dcdaafeb10426642918303d57fc..e88e8ff4b32c5329ccc3c5b5bebdfa112316a3ef 100644 (file)
@@ -267,6 +267,9 @@ class XendRoot:
     def get_dom0_vcpus(self):
         return self.get_config_int('dom0-cpus', self.dom0_vcpus_default)
 
+    def get_console_limit(self):
+        return self.get_config_int('console-limit', 1024)
+
 def instance():
     """Get an instance of XendRoot.
     Use this instead of the constructor.